package com.inst.jsoup_html_demo.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.github.clans.fab.FloatingActionButton;
import com.github.clans.fab.FloatingActionMenu;
import com.inst.jsoup_html_demo.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;


/**
 */

public class MineFragment extends Fragment {


    @BindView(R.id.tv_home_shouye)
    TextView mTvHomeShouye;
    @BindView(R.id.tv_home_fenye)
    TextView mTvHomeFenye;
    @BindView(R.id.tv_home_shicai)
    TextView mTvHomeShicai;
    @BindView(R.id.iv_add)
    ImageView mIvAdd;
    @BindView(R.id.tv_facaipu)
    TextView mTvFacaipu;
    @BindView(R.id.rl_facaifu)
    RelativeLayout mRlFacaifu;
    @BindView(R.id.toolbar)
    Toolbar mToolbar;
    Unbinder unbinder;
    @BindView(R.id.iv_usericon)
    ImageView mIvUsericon;
    @BindView(R.id.iv_userset)
    ImageView mIvUserset;
    @BindView(R.id.rl_user)
    RelativeLayout mRlUser;
    @BindView(R.id.tv_xingyuncao_num)
    TextView mTvXingyuncaoNum;
    @BindView(R.id.ll_xingyuncao)
    LinearLayout mLlXingyuncao;
    @BindView(R.id.tv_meili_num)
    TextView mTvMeiliNum;
    @BindView(R.id.ll_meili)
    LinearLayout mLlMeili;
    @BindView(R.id.tv_guanzhu_num)
    TextView mTvGuanzhuNum;
    @BindView(R.id.ll_guanzhu)
    LinearLayout mLlGuanzhu;
    @BindView(R.id.tv_fenxi_num)
    TextView mTvFenxiNum;
    @BindView(R.id.ll_fenxi)
    LinearLayout mLlFenxi;
    @BindView(R.id.tv_fangke_num)
    TextView mTvFangkeNum;
    @BindView(R.id.ll_fangke)
    LinearLayout mLlFangke;
    @BindView(R.id.rl_all_user)
    RelativeLayout mRlAllUser;
    @BindView(R.id.fab_facaipu)
    FloatingActionButton mFabFacaipu;
    @BindView(R.id.fab_fahuati)
    FloatingActionButton mFabFahuati;
    @BindView(R.id.menu)
    FloatingActionMenu mMenu;
    private String mFrom;

    public static MineFragment newInstance(String from) {
        MineFragment fragment = new MineFragment();
        Bundle bundle = new Bundle();
        bundle.putString("from", from);
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            mFrom = getArguments().getString("from");
        }
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.mine_fragment_layout, null);
        unbinder = ButterKnife.bind(this, view);
        initView(view);
        // initData();
        return view;
    }


    private void initData() {

    }

    private void initView(View view) {
        mTvHomeFenye.setText("我的");
        mTvHomeFenye.setTextSize(22);
        mTvHomeShouye.setVisibility(View.GONE);
        mTvHomeShicai.setVisibility(View.GONE);
        mIvAdd.setImageResource(R.drawable.user_icon_new_setting);
        mTvFacaipu.setText("设置");
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
